<style lang="less">
@import "./home.less";
@import "../styles/common.less";
</style>
<template>
  <!-- <div class="home-main-index">
    <div class="logo">
    </div>
  </div>-->
  <div class="home-main">
    <div class="show-name" v-text="main_title"></div>
  </div>
</template>

<script>
import cityData from "./map-data/get-city-value.js";
import homeMap from "./components/map.vue";
import dataSourcePie from "./components/dataSourcePie.vue";
import visiteVolume from "./components/visiteVolume.vue";
import serviceRequests from "./components/serviceRequests.vue";
import userFlow from "./components/userFlow.vue";
import countUp from "./components/countUp.vue";
import inforCard from "./components/inforCard.vue";
import mapDataTable from "./components/mapDataTable.vue";
import toDoListItem from "./components/toDoListItem.vue";
import Cookies from "js-cookie";
import util from "@/libs/util.js";
import Util from "../../libs/util";
import Utils from "../../libs/mod.utils";

export default {
  name: "home",
  components: {
    homeMap,
    dataSourcePie,
    visiteVolume,
    serviceRequests,
    userFlow,
    countUp,
    inforCard,
    mapDataTable,
    toDoListItem
  },
  data() {
    return {
      count: {
        dashboard_depart: false, //部门领导
        dashboard_organ: false //组织领导
      },
      autoplaySpeed: 4000,
      charts_div_width: 350,
      // 我的仪表盘
      dashboard_person: {},
      dashboard_deps: {},
      // 颜色
      colorObj: Util.constant.colorObj,
      main_title: Util.main_title,
      user_type: "user" // 用户类型
    };
  },
  computed: {},
  mounted: function() {
    var _this = this;
  },
  beforeCreate: function() {
    var _this = this;
  },
  beforeMount: function() {
    var _this = this;
  },
  beforeUpdate: function() {
    var _this = this;
  },
  updated: function() {
    var _this = this;
  },
  beforeDestroy: function() {
    var _this = this;
  },
  destroyed: function() {
    var _this = this;
  },
  created: function() {
    var _this = this;
    _this.$nextTick(function() {
      var mainWidth = $("#main").width();
      var charts_div_width = (mainWidth - 100 - 32 - 32 - 2) / 2;
      if (charts_div_width > 350) {
        _this.charts_div_width = charts_div_width;
      }
    });
  },
  methods: {}
};
</script>
